package service

import (
	"fmt"
	"model"

	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/mysql"
)

type logsService struct {
}

var db *gorm.DB

func init() {
	db, err := gorm.Open("mysql", "root:root@tcp(192.168.1.104:3306)/yyu?charset=utf8&parseTime=True&loc=Local")
	if err != nil {
		fmt.Println("connection error!" + err.Error())
	}
	defer db.Close()
}

func (logs logsService) AddLog(item model.Notice) {

}
